package com.peas.platform.module.icims.base.approve.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 审批模版
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_approve`")
public class ApprovePo extends BasePo {

    // 审批模版类型
    // 枚举取值:ApproveType
    @Comment(value = "审批模版类型", enumType = "ApproveType")
    @NotBlank(message = "审批模版类型不能为空")
    @Size(max = 20, message = "审批模版类型不能超过20个字符")
    @TableField(value = "`approve_type`", jdbcType = JdbcType.VARCHAR)
    private String approveType;

    // 审批模版编码
    @Comment(value = "审批模版编码")
    @Size(max = 100, message = "审批模版编码不能超过100个字符")
    @TableField(value = "`approve_code`", jdbcType = JdbcType.VARCHAR)
    private String approveCode;

    // 审批模版名称
    @Comment(value = "审批模版名称")
    @NotBlank(message = "审批模版名称不能为空")
    @Size(max = 200, message = "审批模版名称不能超过200个字符")
    @TableField(value = "`approve_name`", jdbcType = JdbcType.VARCHAR)
    private String approveName;

    // 状态
    // 枚举取值:CommonEnableDisable
    @Comment(value = "状态", enumType = "CommonEnableDisable")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    // 所属部门
    // 【组织架构表】
    @Comment(value = "所属部门")
    @TableField(value = "`organization_id`", jdbcType = JdbcType.BIGINT)
    private Long organizationId;

    // 所属用户
    // 【用户表】
    @Comment(value = "所属用户")
    @TableField(value = "`user_id`", jdbcType = JdbcType.BIGINT)
    private Long userId;

    // 系统模块
    // 枚举取值:Module
    @Comment(value = "系统模块", enumType = "Module")
    @Size(max = 20, message = "系统模块不能超过20个字符")
    @TableField(value = "`module`", jdbcType = JdbcType.VARCHAR)
    private String module;

    // 业务模块
    // 枚举取值:ApproveBusiness
    @Comment(value = "业务模块", enumType = "ApproveBusiness")
    @Size(max = 20, message = "业务模块不能超过20个字符")
    @TableField(value = "`business`", jdbcType = JdbcType.VARCHAR)
    private String business;

    // 权重
    @Comment(value = "权重")
    @TableField(value = "`weight`", jdbcType = JdbcType.INTEGER)
    private Integer weight;

}
